package org.lee.controller;

import java.util.List;

import org.lee.bean.common.CustomBean;
import org.lee.bean.domain1.Person1;
import org.lee.service.PersonService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("person")
public class BothPersonController {

	@Autowired PersonService service;
	
	@RequestMapping(value="add")
	public def add(@RequestParam(value="fail", defaultValue="false", required=false) boolean fail){
		return service.saveBoth(fail);
	}
	
}
